package com.community.community.exception;

import lombok.Getter;

public class CustomException extends RuntimeException {
    // Getter 方法
    @Getter
    private int code; // 自定义错误码
    private String message; // 自定义错误信息

    // 构造方法
    public CustomException(String message) {
        super(message);
        this.code = 444;
        this.message = message;
    }

    @Override
    public String getMessage() {
        return message;
    }
}